<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数的定义和调用</title>
    <script src="js/utils.js"></script>
</head>
<body>

</body>

<script>

/**
 *  函数的调用/执行
 *    函数+参数列表
 *           实际参数
 * */

    //steps();

/* var work=   doSth("homeWork");

 alert(work);*/

/*var message=  foo('hello','world'); // hello world*/

 var arr = [1,3,2];

  var num=   max(arr,function (arr) {

        for(var i=0;i<arr.length-1;i++){

            if(arr[i]>arr[i+1]){
                var temp =arr[i];
                arr[i] = arr[i+1];
                arr[i+1] = temp;
            }
        }
        return arr[arr.length-1];
    });


  alert(num);

</script>
</html>